package com.apple.test.controller;

import com.apple.test.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by tongtao.zhu on 2017/6/10.
 */
@Controller
@RequestMapping(value = "student")
public class StudentController {
    @Autowired
    private StudentService studentService;

    @RequestMapping(value = "list")
    public String list(ModelMap modelMap){
        String student = studentService.list();
        modelMap.addAttribute("student",student);
        return "student/list";
    }
}
